#ifndef TRACKBALL_H
#define TRACKBALL_H

namespace TrackBall {

void ProjectToSphere(int x, int y, int width, int height, float *pt);
float Rotation(float *lastPos, float *currentPos, float *axis);
float Rotation(int width, int height, int *lastPos, int *currentPos, float *axis);
void RotationMatrix(float angle, float *axis, float *m);
void MultMatrix(const float *in, float *out);
void GetQ(const float angle, const float *axis, float *Q);
void AccumulateQ(const float *pre, const float *cur, float *out);
void RotationMatrix(const float *Q, float *m);

}

#endif // TRACKBALL_H
